home *** CD-ROM | disk | FTP | other *** search
/ Aminet 4 / Aminet 4 - November 1994.iso / aminet / dev / gcc / libnix.lha / gnu / lib / libnix / sources.lha / nix / submake
Encoding:
Text File  |  1994-06-25  |  1.2 KB  |  50 lines

  1. OPTIONS=-I ../headers -O3 -Wall
  2. BOPTIONS=$(OPTIONS) -fbaserel -msmall-code -DSMALL_DATA
  3. REDEF=-D _DOSBase=___DOSBase \
  4.       -D _UtilityBase=___UtilityBase \
  5.       -D _MathIeeeSingBasBase=___MathIeeeSingBasBase \
  6.       -D _MathIeeeSingTransBase=___MathIeeeSingTransBase \
  7.       -D _MathIeeeDoubBasBase=___MathIeeeDoubBasBase \
  8.       -D _MathIeeeDoubTransBase=___MathIeeeDoubTransBase \
  9.       -D _LocaleBase=___LocaleBase
  10. PATTERN="*"
  11.  
  12. #Use private library bases to avoid naming collisions
  13. %.o: %.c
  14.     gcc $(OPTIONS) -S $*.c -o $*.S 2>&1|tee $*.err
  15.     gcc -E -traditional -P $(REDEF) $*.S -o $*2.S
  16.     gcc $*2.S -c -o $*.o
  17.     -rm $*.S $*2.S
  18.     -if test ! -s $*.err; then rm $*.err; fi
  19.  
  20. %.bo: %.c
  21.     gcc $(BOPTIONS) -S $*.c -o $*.S 2>&1|tee $*.err
  22.     gcc -E -traditional -P $(REDEF) $*.S -o $*2.S
  23.     gcc $*2.S -c -o $*.bo
  24.     -rm $*.S $*2.S
  25.     -if test ! -s $*.err; then rm $*.err; fi
  26.  
  27. all: libnix.a blibnix.a
  28.  
  29. makefile: submake ../headers/makemake
  30.     rx /headers/makemake $(PATTERN) >makefile
  31.  
  32. clean:
  33.     -rm */*.o */*.bo */*.err
  34.  
  35. veryclean: clean
  36.     -rm libnix.a blibnix.a makefile
  37.  
  38. libnix.a: $(OBJECTS) makefile
  39.     -rm libnix.a
  40.     ar -q libnix.a $(OBJECTS)
  41.     ranlib libnix.a
  42.  
  43. blibnix.a: $(BOBJECTS) makefile
  44.     -rm blibnix.a
  45.     ar -q blibnix.a $(BOBJECTS)
  46.     ranlib blibnix.a
  47.  
  48. .SUFFIXES:
  49. .SUFFIXES: .o .bo
  50.